import 'package:flutter/material.dart';

import '../../config/public_color.dart';

/// FileName border_decoration
///
/// @Author lax
/// @Date 2023/3/28
///
/// @Description

class BorderDecoration extends BoxDecoration {
  /// 默认边框颜色
  static Color? defaultBorderColor;

  BorderDecoration({
    Color? color = Colors.transparent,
    double? radius,
    double? borderWidth = 1,
    Color? borderColor,
    BoxShape? shape,
  }) : super(
          color: color,
          borderRadius: shape == null
              ? BorderRadius.all(Radius.circular(radius ?? 0))
              : null,
          border: Border.all(
              width: borderWidth ?? 0,
              color: borderColor ?? defaultBorderColor ?? PublicColor.border),
          shape: shape ?? BoxShape.rectangle,
        );
}
